<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
            Object.defineProperty：
                - 给对象的扩展一个属性并且添加属性的描述
                - - value:属性值
                        - writable:是否可以修改
                        - enumerable:是否可以枚举，遍历
                        - configable：是否可以删除
            Object.defineProperty():
                - 只有两个参数
                - 参数一：对象，
                - 参宿二：对象的描述，对象里面包含对象
        */
        var o = {
            
        };
        Object.defineProperty(o,"name",{
            value:"laowang",
            writable:true,
            enumerable:true,
            configurable:true
        });
        console.log(o);
       Object.defineProperties(o,{
           hobby:{
               value:["喝酒",'抽烟','吹牛逼'],
               writable:true,
               enumerable:true,
               configurable:true
           },
           study:{
               value:"javascript"
           }
       }) 
       console.log(o);
    </script>
</body>
</html>